﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace DicomLibrary.Parsing
{
    public class DParserFactory
    {
        public static DParser CreateDParser(DTransferSyntax transferSyntax, BinaryReader binaryReader)
        {
            switch (transferSyntax)
            {
                case DTransferSyntax.ExplicitBigEndian:
                    return new ExplicitBigEndianParser(transferSyntax, binaryReader);
                case DTransferSyntax.ExplicitLittleEndian:
                    return new ExplicitLittleEndianParser(transferSyntax, binaryReader);
                case DTransferSyntax.ImplicitLittleEndian:
                    return new ImplicitLittleEndianParser(transferSyntax, binaryReader);
                default:
                    throw new NotImplementedException();
            }
        }
    }
}
